package com.ilancuo.numric;

import java.text.DecimalFormat;

/**
 * DecimalTest
 * Created by ilancuo on 2018/4/12.
 */
public class DecimalTest {

    public static void main(String[] args) {
        System.out.println(format(123));
    }

    public static String format(double d) {
        DecimalFormat format = new DecimalFormat("#.00");
        return format.format(d);
    }
}
